:: It is recommended to test the script on a local machine for its purpose and effects. :: ManageEngine Desktop Central will not be responsible for any :: damage/loss to the data/setup based on the behavior of the script. :: Description: Script to manage InPrivate browsing in Edge Browser :: Script Arguments: 1 - Enabled (Allows InPrivate website browsing) :: 2 - Disabled (Disallows InPrivate website browsing) :: 3 - Not Configured (Allows InPrivate website browsing) :: Configuration Type - COMPUTER :: =========================================================================================================================== @echo off IF NOT "%1"=="" ( set param=%1 ) else ( Echo Script argument is empty. Please read the description of the script exit 1 ) if %param%==1 ( reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main" /v "AllowInPrivate" /t REG_DWORD /d 1 /f goto ext ) if %param%==2 ( reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main" /v "AllowInPrivate" /t REG_DWORD /d 0 /f goto ext ) if %param%==3 ( reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main" /v "AllowInPrivate" /f goto ext ) echo Incorrect Argument. Please check description exit 1 :ext echo Configured Successfully exit 0